<!DOCTYPE html>
<html>
<head>
    <title>会员视频管理</title>
    #parse("sys/header.html")
</head>
<body>
<div id="rrapp" v-cloak>
    <div v-show="showList">
        <Row :gutter="16">

            <!--<i-col span="4">-->
            <!--<i-input v-model="q.name" @on-enter="query" placeholder="名称"/>-->
            <!--</i-col>-->
            <i-col span="12">
                <!--<i-button @click="query">查询</i-button>-->
                #if($shiro.hasPermission("uservideo:save"))
                <i-button type="info" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</i-button>
                #end
                #if($shiro.hasPermission("uservideo:delete"))
                <i-button type="error" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</i-button>
                #end
            </i-col>
        </Row>
        <table id="jqGrid"></table>
        <div id="jqGridPager"></div>
    </div>

    <Card v-show="!showList">
        <p slot="title">{{title}}</p>
        <i-form ref="formValidate" :model="apiUserVideo" :rules="ruleValidate" :label-width="80">
            <!--<Form-item label="视频地址" prop="videoUrl">-->
            <!--<i-input v-model="apiUserVideo.videoUrl" placeholder="视频地址"/>-->
            <!--</Form-item>-->

            <Row>
                <i-col span="16">
                    <Form-item label="视频地址" prop="videoUrl">
                        <i-input v-model="apiUserVideo.videoUrl" placeholder="视频地址" readonly/>
                    </Form-item>
                </i-col>
                <i-col span="3">
                    <Form-item :label-width="1">
                        <Upload style="width: 300px;" action="../api/auth/upload"
                                :format="['mp4']"
                                max-size="30720"
                                :on-success="handleSuccess" :on-format-error="handleFormatError"
                                :show-upload-list="false"
                                :on-exceeded-size="handleMaxSize">
                            <i-button icon="ios-cloud-upload-outline">上传</i-button>
                        </Upload>
                    </Form-item>
                </i-col>
                <i-col span="3">

                </i-col>
            </Row>

            <Form-item label="内容" prop="content">
                <i-input v-model="apiUserVideo.content" placeholder="内容"/>
            </Form-item>
            <Form-item label="是否付费" prop="payStatus">
                <Radio-group v-model="apiUserVideo.payStatus">
                    <Radio label="1">
                        <span>是</span>
                    </Radio>
                    <Radio label="2">
                        <span>否</span>
                    </Radio>
                </Radio-group>
                <!--<i-input v-model="apiUserVideo.payStatus" placeholder="是否需要付费 1 是 2 否"/>-->
            </Form-item>
            <Form-item label="支付金额" prop="amount">
                <i-input type="number" v-model="apiUserVideo.amount" placeholder="设定支付金额"/>
            </Form-item>

            <Form-item label="主播" prop="userId">
                <i-Select v-model="apiUserVideo.userId" style="width:400px" placeholder="">
                    <i-Option v-for="item in zbList" :value="item.id" :key="item.id">{{ item.name }}
                    </i-Option>
                </i-Select>
                <!--<i-input v-model="apiUserVideo.userId" placeholder="发布会员id"/>-->
            </Form-item>
            <Form-item>
                <i-button type="primary" @click="handleSubmit('formValidate')">提交</i-button>
                <i-button type="warning" @click="reload" style="margin-left: 8px"/>
                返回</i-button>
            </Form-item>
        </i-form>
    </Card>
    <div id="staticAuding" style="display: none;padding:10px;">
        <i-form :model="apiUserVideo" :label-width="100">
            <Form-item label="审核状态" prop="isshow">
                <Radio-group v-model="apiUserVideo.isshow">
                    <Radio label="1">
                        <span>审核通过</span>
                    </Radio>
                    <Radio label="2">
                        <span>审核失败</span>
                    </Radio>
                </Radio-group>
            </Form-item>
        </i-form>
    </div>
</div>


<script src="${rc.contextPath}/js/sysapi/apiuservideo.js?_${date.systemTime}"></script>
</body>
</html>